<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>meeting detail</title>
  <meta name="description" content="">
  <meta name="keywords" content="scrum,agile,project management">
  <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">
    <style type="text/css">
		<%@ include file="/WEB-INF/css/style.css" %>
	</style>
	<script src="jquery-1.4.4.min.js"> </script>
	<script type="text/javascript">
	$(document).ready(function () {
        $('#close').click(function () {
            window.opener.location.reload(true);
            window.close();
        });
    });
	</script>


</head>
<body onunload="window.opener.location.reload();">
<div class="page-inpop">
<div class="pagepop">
<div class="main">
<div class="contentpop">
	<h2 class="sidebar1">Meeting management</h2>
			   		<form action="MeetingDetails" method="post">
							<input type="hidden" name="mtgid" value="${selectMeeting.id}"/>
			 				<h3>Meeting type:</h3> 
			 				<c:choose>
			       				<c:when test="${selectMeeting.type == \"DailyScrum\"}">
				    				<p><input type="radio" name="type" value="DailyScrum" checked="checked"/>DailyScrum</p>
							    </c:when>
							    <c:otherwise>
			       					<p><input type="radio" name="type" value="DailyScrum"/>DailyScrum</p>
							    </c:otherwise>
							</c:choose>
			 				<c:choose>
			       				<c:when test="${selectMeeting.type == \"BacklogGrooming\"}">
				    				<p><input type="radio" name="type" value="BacklogGrooming" checked="checked"/>BacklogGrooming</p>
							    </c:when>
							    <c:otherwise>
			       					<p><input type="radio" name="type" value="BacklogGrooming"/>BacklogGrooming</p>
							    </c:otherwise>
							</c:choose>
			 				<c:choose>
			       				<c:when test="${selectMeeting.type == \"ScrumOfScrums\"}">
				    				<p><input type="radio" name="type" value="ScrumOfScrums" checked="checked"/>ScrumOfScrums</p>
							    </c:when>
							    <c:otherwise>
			       					<p><input type="radio" name="type" value="ScrumOfScrums"/>ScrumOfScrums</p>
							    </c:otherwise>
							</c:choose>
			 				<c:choose>
			       				<c:when test="${selectMeeting.type == \"SprintPlanning\"}">
				    				<p><input type="radio" name="type" value="SprintPlanning" checked="checked"/>SprintPlanning</p>
							    </c:when>
							    <c:otherwise>
			       					<p><input type="radio" name="type" value="SprintPlanning"/>SprintPlanning</p>
							    </c:otherwise>
							</c:choose>
			 				<c:choose>
			       				<c:when test="${selectMeeting.type == \"SprintReview\"}">
				    				<p><input type="radio" name="type" value="SprintReview" checked="checked"/>SprintReview</p>
							    </c:when>
							    <c:otherwise>
			       					<p><input type="radio" name="type" value="SprintReview"/>SprintReview</p>
							    </c:otherwise>
							</c:choose>
			 				<c:choose>
			       				<c:when test="${selectMeeting.type == \"SprintRetrospective\"}">
				    				<p><input type="radio" name="type" value="SprintRetrospective" checked="checked"/>SprintRetrospective</p>
							    </c:when>
							    <c:otherwise>
			       					<p><input type="radio" name="type" value="SprintRetrospective"/>SprintRetrospective</p>
							    </c:otherwise>
							</c:choose>
			 				<h3>Meeting date[yyyy-MM-dd]:</h3> <input type="date" name="date" value="${selectMeeting.date}">
			 				<h3>Meeting attendees:</h3>
						    <c:forEach items="${users}" var="user">
							    <c:choose>
				       				<c:when test="${selectMeeting.attends(user.getId())}">
					    				<p><input type="checkbox" name="stringAttendees" value="${user.getId()}" checked="checked"/>${user.getName()}</p>
								    </c:when>
								    <c:otherwise>
				       					<p><input type="checkbox" name="stringAttendees" value="${user.getId()}"/>${user.getName()}</p>
								    </c:otherwise>
								</c:choose>
					   		</c:forEach>
			 				<input id="plus" type="submit" name="action" value="Add"/>
			 				<c:if test="${selectMeeting.id != null}"><input id="edit" type="submit" name="action" value="Update"/></c:if>
			 				</form>
			 				<h3>Meeting comments: </h3>
						   		<c:forEach items="${comments}" var="comment" varStatus="i">
			   					<form action="MeetingDetails" method="post">
								<input type="hidden" name="mtgid" value="${selectMeeting.id}"/>
							    	<p><input type="hidden" name="cmtid" value="${comment.getKey()}"/>
							    	<c:out value="${comment.getValue()}"/>
							    	<input id="minus" type="submit" name="action" value="DeleteComment"/></p>
							    </form>
					   			</c:forEach>
			   					<form action="MeetingDetails" method="post">
								<input type="hidden" name="mtgid" value="${selectMeeting.id}"/>
					   			<p>New Comment: <input type="text" name="cmt" value=""> <input id="plus" type="submit" name="action" value="AddComment"/></p>
					   			</form>
							
					   		
					   		
					<p align="right"><input type='button' id='close' value='Close' /></p>
</div>
</div>
</div>
</div>
</body>
</html>